package com.example.travelservlet.entertainment.repository;

import com.example.travelservlet.entity.Entertainment;
import net.bytebuddy.asm.Advice;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * @author hxy
 * @date 2022/11/8 11:56
 */
public interface EntertainmentRepository extends JpaRepository<Entertainment,String>, JpaSpecificationExecutor {
    Entertainment findEntertainmentByEntertainmentId(String entertainmentId);
    List<Entertainment> findEntertainmentsByCityIdAndName(String cityId,String name);
    List<Entertainment> findEntertainmentsByCityIdAndType(String cityId,String type);
    List<Entertainment> findEntertainmentsByType(String type);

    void deleteById(String entertainmentId);
}
